const Sequelize = require('sequelize');
module.exports = function(sequelize, DataTypes) {
  return sequelize.define('base_projectdetails0', {
    id: {
      type: DataTypes.STRING(255),
      allowNull: false,
      primaryKey: true,
      comment: "项目id"
    },
    projectName: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "项目名称",
      field: 'project_name'
    },
    projectType: {
      type: DataTypes.STRING(64),
      allowNull: true,
      comment: "项目类型（1：房建；2：交通；3：水利；4：园林）",
      field: 'project_type'
    },
    projectAddress: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "项目地址",
      field: 'project_address'
    },
    progress: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "施工进度"
    },
    countyCode: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "所在区县编号",
      field: 'county_code'
    },
    qxCode: {
      type: DataTypes.STRING(6),
      allowNull: true,
      comment: "区县编码",
      field: 'qx_code'
    },
    supervisionLevel: {
      type: DataTypes.STRING(1),
      allowNull: true,
      comment: "监管层级（1：市管；2：区管）",
      field: 'supervision_level'
    },
    projectStage: {
      type: DataTypes.STRING(2),
      allowNull: true,
      comment: "项目阶段（1：提前介入；2：在建-开工；3：在建-停工；4：竣工）",
      field: 'project_stage'
    },
    regulators: {
      type: DataTypes.STRING(64),
      allowNull: true,
      comment: "监管部门"
    },
    plannedBeginTime: {
      type: DataTypes.DATE,
      allowNull: true,
      comment: "计划开工时间",
      field: 'planned_begin_time'
    },
    plannedEndTime: {
      type: DataTypes.DATE,
      allowNull: true,
      comment: "计划竣工时间",
      field: 'planned_end_time'
    },
    beginTime: {
      type: DataTypes.DATE,
      allowNull: true,
      comment: "开工时间",
      field: 'begin_time'
    },
    endTime: {
      type: DataTypes.DATE,
      allowNull: true,
      comment: "竣工时间",
      field: 'end_time'
    },
    approvalCode: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "立项编号\r\n",
      field: 'approval_code'
    },
    jsydghCode: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "用地规划编号\r\n",
      field: 'jsydgh_code'
    },
    jsgcghCode: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "工程规划编号\r\n",
      field: 'jsgcgh_code'
    },
    drawcertCode: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "图审编号\r\n",
      field: 'drawcert_code'
    },
    contractConsCode: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "施工合同编号\r\n",
      field: 'contract_cons_code'
    },
    contractSuperCode: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "监理合同编号\r\n",
      field: 'contract_super_code'
    },
    contractEconCode: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "勘察合同编号\r\n",
      field: 'contract_econ_code'
    },
    contractDesignCode: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "设计合同编号\r\n",
      field: 'contract_design_code'
    },
    adminaccount: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "落图管理员账号"
    },
    remarks: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "备注"
    },
    deletemark: {
      type: DataTypes.INTEGER,
      allowNull: true,
      comment: "是否删除"
    },
    createdUser: {
      type: DataTypes.STRING(32),
      allowNull: true,
      comment: "创建人",
      field: 'created_user'
    },
    createdTime: {
      type: DataTypes.DATE,
      allowNull: true,
      comment: "创建时间",
      field: 'created_time'
    },
    updatedUser: {
      type: DataTypes.STRING(32),
      allowNull: true,
      comment: "更新人",
      field: 'updated_user'
    },
    updatedTime: {
      type: DataTypes.DATE,
      allowNull: true,
      comment: "更新时间",
      field: 'updated_time'
    },
    projectName0: {
      type: DataTypes.STRING(255),
      allowNull: true,
      field: 'project_name0'
    },
    projectId: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "项目id151",
      field: 'project_id'
    },
    projectnoPt: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "地图点项目编号",
      field: 'projectno_pt'
    }
  }, {
    sequelize,
    tableName: 'base_projectdetails0',
    hasTrigger: true,
    timestamps: false,
    indexes: [
      {
        name: "PRIMARY",
        unique: true,
        using: "BTREE",
        fields: [
          { name: "id" },
        ]
      },
    ]
  });
};
